﻿using UI;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(UIFormInfoAsset))]
public class UIFormInfoAssetInspector : Editor
{
    public UIFormInfoAsset Target
    {
        get { return target as UIFormInfoAsset; }
    }

    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        base.OnInspectorGUI();
        var infoProerty =  serializedObject.FindProperty("_info");
        var uiLayerProperty = infoProerty.FindPropertyRelative("Layer");
        uiLayerProperty.intValue = EditorGUILayout.Popup(Target.Info.Layer, UISystem.Settings.UILayerNames);
        serializedObject.ApplyModifiedProperties();
    }


}
